(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
purge(nil) → nil
purge(.(x, y)) → .(x, purge(remove(x, y)))
remove(x, nil) → nil
remove(x, .(y, z)) → if(=(x, y), remove(x, z), .(y, remove(x, z)))
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
purge(nil) → nil
purge(.(x, y)) → .(x, purge(remove(x, y)))
remove(x, nil) → nil
remove(x, .(y, z)) → if(='(x, y), remove(x, z), .(y, remove(x, z)))
S is empty.
Rewrite Strategy: FULL
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
./0
remove/0
if/0
='/0
='/1
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
purge(nil) → nil
purge(.(y)) → .(purge(remove(y)))
remove(nil) → nil
remove(.(z)) → if(remove(z), .(y, remove(z)))
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
purge(nil) → nil
purge(.(y)) → .(purge(remove(y)))
remove(nil) → nil
remove(.(z)) → if(remove(z), .(y, remove(z)))
Types:
purge :: nil:.:if → nil:.:if
nil :: nil:.:if
. :: nil:.:if → nil:.:if
remove :: nil:.:if → nil:.:if
if :: nil:.:if → . → nil:.:if
. :: y → nil:.:if → .
y :: y
hole_nil:.:if1_0 :: nil:.:if
hole_.2_0 :: .
hole_y3_0 :: y
gen_nil:.:if4_0 :: Nat → nil:.:if
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
purge,
removeThey will be analysed ascendingly in the following order:
remove < purge
(8) Obligation:
TRS:
Rules:
purge(
nil) →
nilpurge(
.(
y)) →
.(
purge(
remove(
y)))
remove(
nil) →
nilremove(
.(
z)) →
if(
remove(
z),
.(
y,
remove(
z)))
Types:
purge :: nil:.:if → nil:.:if
nil :: nil:.:if
. :: nil:.:if → nil:.:if
remove :: nil:.:if → nil:.:if
if :: nil:.:if → . → nil:.:if
. :: y → nil:.:if → .
y :: y
hole_nil:.:if1_0 :: nil:.:if
hole_.2_0 :: .
hole_y3_0 :: y
gen_nil:.:if4_0 :: Nat → nil:.:if
Generator Equations:
gen_nil:.:if4_0(0) ⇔ nil
gen_nil:.:if4_0(+(x, 1)) ⇔ .(gen_nil:.:if4_0(x))
The following defined symbols remain to be analysed:
remove, purge
They will be analysed ascendingly in the following order:
remove < purge
(9) RewriteLemmaProof (EQUIVALENT transformation)
Proved the following rewrite lemma:
remove(
gen_nil:.:if4_0(
+(
1,
n6_0))) →
*5_0, rt ∈ Ω(2
n)
Induction Base:
remove(gen_nil:.:if4_0(+(1, 0)))
Induction Step:
remove(gen_nil:.:if4_0(+(1, +(n6_0, 1)))) →RΩ(1)
if(remove(gen_nil:.:if4_0(+(1, n6_0))), .(y, remove(gen_nil:.:if4_0(+(1, n6_0))))) →IH
if(*5_0, .(y, remove(gen_nil:.:if4_0(+(1, n6_0))))) →IH
if(*5_0, .(y, *5_0))
We have rt ∈ Ω(2n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(2n)
(10) BOUNDS(2^n, INF)